package com.yjd.comm.borrow.model;

import com.yjd.comm.base.model.Model;
import com.yjd.comm.util.DateUtil;

/**
 * <b>description</b>：用户详细信息模型<br>
 * <b>time</b>：2014-11-13 21:23:16 <br>
 * <b>author</b>： percy percy-chen@hotmail.com
 */
public class CreditorModel extends Model {

	/**
	 * @Fields serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 债权id
	 */
	private Long creditor_id;
	/**
	 * 标的id
	 */
	private Long borrow_id;
	/**
	 * 债权人
	 */
	private Long user_id;
	/**
	 * 投资金额
	 */
	private Double invest;
	/**
	 * 剩余期数
	 */
	private Integer limit_surplus;
	/**
	 * 待回收本息(每次还款递减（减去还款的本金、借款人支付利息、加息金额[不包含非正常情况之下的费用]）)
	 */
	private Double recovery;
	/**
	 * 待回收本金（对应的profit_form中所有的本金之和）
	 */
	private Double capital;
	/**
	 * 累计利息(对应的profit_form中所有的interest之和+raise_interest_price之和)
	 */
	private Double profit;
	/**
	 * 状态，1：正常，2：转让中，3：已转让，默认为1
	 */
	private Integer status;
	/**
	 * 债权开始日期
	 */
	private Long starttime;
	/**
	 * 结束日期
	 */
	private Long endtime;
	/**
	 * 债转债权价值
	 */
	private Double transferprice;
	/**
	 * 债转剩余本金
	 */
	private Double transfercapital;
	/**
	 * 债转待收本息
	 */
	private Double transferrecovery;
	/**
	 * 债转剩余期限
	 */
	private Integer transferlimit_surplus;
	/**
	 * 债转开始时间
	 */
	private Long transferstarttime;
	/**
	 * 债转结束时间
	 */
	private Long transferendtime;
	/**
	 * 债转成交时间
	 */
	private Long transferoktime;
	/**
	 * 最后更新日期
	 */
	private Long uptime;
	/**
	 * 债权中使用的红包
	 */
	private Double reward;
	/**
	 * 债权中使用的代金券
	 */
	private Double volume;

	/**
	 * 债权转让对象id
	 */
	private Long creditor_transfer_id;

	/**
	 * 持有原始本金份数(每份金额参数borrow中each_price)
	 */
	private Integer partnum;

	/**
	 * 加息券编号
	 */
	private Long raise_interest_volume_id;
	

	public CreditorModel() {
	}

	public CreditorModel(Long borrow_id, Long user_id, Double invest,
			Integer limit_surplus, Double recovery, Double capital,
			Double profit, Integer status, Long starttime, Long endtime,
			Double transferprice, Double transfercapital,
			Double transferrecovery, Integer transferlimit_surplus,
			Long transferstarttime, Long transferendtime, Long transferoktime,
			Long uptime, Double reward, Double volume, Long version,
			Integer partnum) {
		this.borrow_id = borrow_id;
		this.user_id = user_id;
		this.invest = invest;
		this.limit_surplus = limit_surplus;
		this.recovery = recovery;
		this.capital = capital;
		this.profit = profit;
		this.status = status;
		this.starttime = starttime;
		this.endtime = endtime;
		this.transferprice = transferprice;
		this.transfercapital = transfercapital;
		this.transferrecovery = transferrecovery;
		this.transferlimit_surplus = transferlimit_surplus;
		this.transferstarttime = transferstarttime;
		this.transferendtime = transferendtime;
		this.transferoktime = transferoktime;
		this.uptime = uptime;
		this.reward = reward;
		this.volume = volume;
		this.version = version;
		this.partnum = partnum;
		this.raise_interest_volume_id = 0L;
	}

	public CreditorModel(Long borrow_id, Long user_id, Double invest,
			Integer limit_surplus, Double recovery, Double capital,
			Double profit, Integer status, Long starttime, Long endtime,
			Double transferprice, Double transfercapital,
			Double transferrecovery, Integer transferlimit_surplus,
			Long transferstarttime, Long transferendtime, Long transferoktime,
			Long uptime, Double reward, Double volume, Long version,
			Integer partnum, Long creditor_transfer_id) {
		this.borrow_id = borrow_id;
		this.user_id = user_id;
		this.invest = invest;
		this.limit_surplus = limit_surplus;
		this.recovery = recovery;
		this.capital = capital;
		this.profit = profit;
		this.status = status;
		this.starttime = starttime;
		this.endtime = endtime;
		this.transferprice = transferprice;
		this.transfercapital = transfercapital;
		this.transferrecovery = transferrecovery;
		this.transferlimit_surplus = transferlimit_surplus;
		this.transferstarttime = transferstarttime;
		this.transferendtime = transferendtime;
		this.transferoktime = transferoktime;
		this.uptime = uptime;
		this.reward = reward;
		this.volume = volume;
		this.version = version;
		this.partnum = partnum;
		this.creditor_transfer_id = creditor_transfer_id;
		this.raise_interest_volume_id = 0L;
	}

	public Long getCreditor_id() {
		return creditor_id;
	}

	public void setCreditor_id(Long creditor_id) {
		this.creditor_id = creditor_id;
	}

	public Long getBorrow_id() {
		return borrow_id;
	}

	public void setBorrow_id(Long borrow_id) {
		this.borrow_id = borrow_id;
	}

	public Long getUser_id() {
		return user_id;
	}

	public void setUser_id(Long user_id) {
		this.user_id = user_id;
	}

	public Double getInvest() {
		return invest;
	}

	public void setInvest(Double invest) {
		this.invest = invest;
	}

	public Integer getLimit_surplus() {
		return limit_surplus;
	}

	public void setLimit_surplus(Integer limit_surplus) {
		this.limit_surplus = limit_surplus;
	}

	public Double getRecovery() {
		return recovery;
	}

	public void setRecovery(Double recovery) {
		this.recovery = recovery;
	}

	public Double getCapital() {
		return capital;
	}

	public void setCapital(Double capital) {
		this.capital = capital;
	}

	public Double getProfit() {
		return profit;
	}

	public void setProfit(Double profit) {
		this.profit = profit;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Long getStarttime() {
		return starttime;
	}

	public void setStarttime(Long starttime) {
		this.starttime = starttime;
	}

	public Long getEndtime() {
		return endtime;
	}

	public void setEndtime(Long endtime) {
		this.endtime = endtime;
	}

	public Double getTransferprice() {
		return transferprice;
	}

	public void setTransferprice(Double transferprice) {
		this.transferprice = transferprice;
	}

	public Double getTransfercapital() {
		return transfercapital;
	}

	public void setTransfercapital(Double transfercapital) {
		this.transfercapital = transfercapital;
	}

	public Double getTransferrecovery() {
		return transferrecovery;
	}

	public void setTransferrecovery(Double transferrecovery) {
		this.transferrecovery = transferrecovery;
	}

	public Integer getTransferlimit_surplus() {
		return transferlimit_surplus;
	}

	public void setTransferlimit_surplus(Integer transferlimit_surplus) {
		this.transferlimit_surplus = transferlimit_surplus;
	}

	public Long getTransferstarttime() {
		return transferstarttime;
	}

	public void setTransferstarttime(Long transferstarttime) {
		this.transferstarttime = transferstarttime;
	}

	public Long getTransferendtime() {
		return transferendtime;
	}

	public void setTransferendtime(Long transferendtime) {
		this.transferendtime = transferendtime;
	}

	public Long getTransferoktime() {
		return transferoktime;
	}

	public void setTransferoktime(Long transferoktime) {
		this.transferoktime = transferoktime;
	}

	public Long getUptime() {
		return uptime;
	}

	public void setUptime(Long uptime) {
		this.uptime = uptime;
	}

	public Double getReward() {
		return reward;
	}

	public void setReward(Double reward) {
		this.reward = reward;
	}

	public Double getVolume() {
		return volume;
	}

	public void setVolume(Double volume) {
		this.volume = volume;
	}

	public Long getCreditor_transfer_id() {
		return creditor_transfer_id;
	}

	public void setCreditor_transfer_id(Long creditor_transfer_id) {
		this.creditor_transfer_id = creditor_transfer_id;
	}

	public Integer getPartnum() {
		return partnum;
	}

	public void setPartnum(Integer partnum) {
		this.partnum = partnum;
	}


	public Long getRaise_interest_volume_id() {
		return raise_interest_volume_id;
	}

	public void setRaise_interest_volume_id(Long raise_interest_volume_id) {
		this.raise_interest_volume_id = raise_interest_volume_id;
	}

	public void setStrMap() {
		this.getStrMap().put(
				"uptime",
				DateUtil.timestampToDateString(new Long(this.getUptime()),
						DateUtil.PATTERN_yyyy_MM_dd_HH_mm_ss));
		this.getStrMap().put(
				"starttime",
				DateUtil.timestampToDateString(new Long(this.getStarttime()),
						DateUtil.PATTERN_yyyy_MM_dd_HH_mm_ss));
		/*
		 * this.getStrMap().put( "endtime",
		 * this.getEndtime()==0?DateUtil.timestampToDateString(new
		 * Long(this.getEndtime()), DateUtil.PATTERN_yyyy_MM_dd_HH_mm_ss):"-");
		 */

	}

}
